package cn.well.cloud.config;

import cn.well.cloud.base.warpper.factory.MapWrapperFactory;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mybatis 配置
 * 处理mybatis 返回数据非驼峰问题
 * Created by wison on 2019年8月26日.
 *
 */
@Configuration
public class MybatisConfig {
    
    /**
     * map
     * @return
     * wison
     * 2019年8月26日
     */
	@Bean
	public ConfigurationCustomizer mybatisConfigurationCustomizer(){
		return new ConfigurationCustomizer() {
			@Override
			public void customize(org.apache.ibatis.session.Configuration configuration) {
				configuration.setObjectWrapperFactory(new MapWrapperFactory());
			}
		};
	}
}
